package com.ruoyi.project.lely.bean.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Length;

/**
 * 品牌
 *
 * @author luoyong
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName(value = "`ly_brand`", autoResultMap = true)
public class LyBrand {


    @ApiModelProperty("ID")
    @TableId("id")
    private Long id;


    @Length(max = 255, message = "品牌商名称长度不能超过255位")
    @NotEmpty
    @ApiModelProperty("品牌商名称")
    @TableField(value = "`name`")
    private String name;


    @Length(max = 255, message = "品牌商简介长度不能超过255位")
    @NotEmpty
    @ApiModelProperty("品牌商简介")
    @TableField(value = "`desc`")
    private String desc;


    @Length(max = 255, message = "品牌商页的品牌商图片长度不能超过255位")
    @NotEmpty
    @ApiModelProperty("品牌商页的品牌商图片")
    @TableField(value = "`pic_url`")
    private String picUrl;


    @ApiModelProperty("ID")
    @TableField(value = "`sort_order`")
    private Integer sortOrder;


    @Digits(integer = 10 - 2, fraction = 2)
    @ApiModelProperty("品牌商的商品低价，仅用于页面展示")
    @TableField(value = "`floor_price`")
    private BigDecimal floorPrice;


    @ApiModelProperty("创建时间")
    @TableField(value = "`create_time`", fill = FieldFill.INSERT)
    private LocalDateTime createTime;


    @ApiModelProperty("更新时间")
    @TableField(value = "`update_time`", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @Length(max = 255, message = "分享二维码图片长度不能超过255位")
    @ApiModelProperty("分享二维码图片")
    @TableField(value = "`share_url`")
    private String shareUrl;


    @ApiModelProperty("管理用户id")
    @TableField(value = "`admin_id`")
    private Integer adminId;


    @ApiModelProperty("逻辑删除")
    @TableField(value = "`deleted`", fill = FieldFill.INSERT)
    private Integer deleted;


    @Length(max = 128, message = "长度不能超过128位")
    @ApiModelProperty("ID")
    @TableField(value = "`commpany`")
    private String commpany;


    @ApiModelProperty("自动监控更新商品")
    @TableField(value = "`auto_update_good`")
    private Integer autoUpdateGood;


    @Length(max = 255, message = "店铺url地址长度不能超过255位")
    @ApiModelProperty("店铺url地址")
    @TableField(value = "`shop_url`")
    private String shopUrl;


    @ApiModelProperty("默认的商品类别id")
    @TableField(value = "`default_category_id`")
    private Integer defaultCategoryId;


    @ApiModelProperty("默认商品页面数")
    @TableField(value = "`default_pages`")
    private Integer defaultPages;


    @ApiModelProperty("店铺商品溢价")
    @TableField(value = "`add_precent`")
    private Integer addPrecent;


    @Length(max = 127, message = "提货地址长度不能超过127位")
    @ApiModelProperty("提货地址")
    @TableField(value = "`address`")
    private String address;


    @Digits(integer = 10 - 7, fraction = 7)
    @ApiModelProperty("经度")
    @TableField(value = "`longitude`")
    private BigDecimal longitude;


    @Digits(integer = 10 - 7, fraction = 7)
    @ApiModelProperty("纬度")
    @TableField(value = "`latitude`")
    private BigDecimal latitude;


    @Length(max = 1023, message = "提货时间配置长度不能超过1023位")
    @ApiModelProperty("提货时间配置")
    @TableField(value = "`fetch_time_rules`")
    private String fetchTimeRules;

}
